package com.tau.egonetwork.facebook;

import com.tau.egonetwork.net.IRequest;

public class FacebookRequest {

	public static IRequest egoProfileRequest(final String access_token) {
		return new IRequest() {
			
			@Override
			public String generateRequestURL() {

				StringBuilder s = new StringBuilder();
				
				s.append("https://graph.facebook.com/");
				s.append("/me");
				s.append("/?fields=id,name,gender,location,work");
				s.append(",");
				s.append("family.fields(id,name,gender,work)");
				s.append(",");
				s.append("friendlists.fields(id,name,members.fields(id,name))");
				s.append(",");
				s.append("friends.fields(id,name,gender,location,work,mutualfriends.fields(id,name))");
				
				s.append("&method=GET");
				s.append("&format=json");
				s.append("&suppress_http_code=1");
				s.append("&access_token=");
				s.append(access_token);
				
				return s.toString();

			}

		};
	}

}
